Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

events: fix race condition #10602

Merged
merged 1 commit into from
Jul 24, 2024
Merged

events: fix race condition #10602

merged 1 commit into from
Jul 24, 2024

Conversation

BeryJu
Copy link
Member

@BeryJu BeryJu commented Jul 24, 2024

Details

Fix race condition due to signal handlers not being scoped. before this PR, it was possible that a new request was started and signal handlers were connected while the old signal handlers were not disconnected yet, hence causing the data from the requests to be mixed together


Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make website)

@BeryJu BeryJu requested a review from a team as a code owner July 24, 2024 11:19
Copy link

netlify bot commented Jul 24, 2024

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit ec73ade
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/66a0fb1b1797f80008fdb69e

Copy link

netlify bot commented Jul 24, 2024

Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit ec73ade
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/66a0fb1bf8c5db000869c236

@BeryJu
Copy link
Member Author

BeryJu commented Jul 24, 2024

/cherry-pick version-2024.6

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 50.93%. Comparing base (13119e2) to head (7ab8d8f).

Files Patch % Lines
authentik/events/middleware.py 77.77% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (13119e2) and HEAD (7ab8d8f). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (13119e2) HEAD (7ab8d8f)
unit 2 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main   #10602       +/-   ##
===========================================
- Coverage   92.51%   50.93%   -41.59%     
===========================================
  Files         718      716        -2     
  Lines       35129    34877      -252     
===========================================
- Hits        32499    17763    -14736     
- Misses       2630    17114    +14484     
Flag Coverage Δ
e2e 49.56% <81.81%> (+0.04%) ⬆️
integration 25.36% <9.09%> (-0.01%) ⬇️
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BeryJu BeryJu force-pushed the events/fix-race-condition branch from 42f4f8f to 7ab8d8f Compare July 24, 2024 11:45
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@BeryJu BeryJu force-pushed the events/fix-race-condition branch from be7502b to ec73ade Compare July 24, 2024 13:01
Copy link
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-ec73aded1a0613d5d2290b25f1b32a71f11aa75d
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

For arm64, use these values:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-ec73aded1a0613d5d2290b25f1b32a71f11aa75d-arm64
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-ec73aded1a0613d5d2290b25f1b32a71f11aa75d

For arm64, use these values:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-ec73aded1a0613d5d2290b25f1b32a71f11aa75d-arm64

Afterwards, run the upgrade commands from the latest release notes.

@BeryJu BeryJu merged commit 49a2a3b into main Jul 24, 2024
67 of 68 checks passed
@BeryJu BeryJu deleted the events/fix-race-condition branch July 24, 2024 14:49
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Jul 24, 2024
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
BeryJu added a commit that referenced this pull request Jul 24, 2024
events: fix race condition (#10602)

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens L. <jens@goauthentik.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants